module CategoriesHelper
  def display_children parent
    return  unless  parent.is_a? Array
    parent.map{|p| "<span>#{link_to_function(p.name ,"append_node_data(#{p.id},'#{p.name}')")}</span>"}.join(" ")
  end
end
